From: Eric Anholt Date: Mon, 15 May 2017 16:28:36 +0000 (-0700) Subject: drm/vc4: Mark the device as active when enabling runtime PM. X-Git-Tag: archive/raspbian/4.9.80-2+rpi1~5^2~217 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=410136a9a02c78819ffef0280ec5a20870d61afa;p=linux-4.9.git drm/vc4: Mark the device as active when enabling runtime PM. Failing to do so meant that we got a resume() callback on first use of the device, so we would leak the bin BO that we allocated during probe. Signed-off-by: Eric Anholt Fixes: 553c942f8b2c ("drm/vc4: Allow using more than 256MB of CMA memory.") --- diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c index 550fcdc57330..fc3c7f73df70 100644 --- a/drivers/gpu/drm/vc4/vc4_v3d.c +++ b/drivers/gpu/drm/vc4/vc4_v3d.c @@ -375,6 +375,7 @@ static int vc4_v3d_bind(struct device *dev, struct device *master, void *data) return ret; } + pm_runtime_set_active(dev); pm_runtime_use_autosuspend(dev); pm_runtime_set_autosuspend_delay(dev, 40); /* a little over 2 frames. */ pm_runtime_enable(dev);